/* eslint-disable */
function padLeftZero(str) {
  return ('00' + str).substr(str.length)
}
export default {
    // 获取随机颜色
    randomColor(){
        let colors = ['teal','purple500','red','pink500','redA700','pinkA700','blue500','indigo500','deepPurple500','teal700','lightBlue800','orange900','brown500','blueGrey700']
        let index = Math.floor(Math.random()*colors.length)
        return colors[index];
    },
    show:function () {
      console.log("公共方法");
    },
    //身份证号验证
    isCardNo(card){ 
      // 身份证号码为15位或者18位，15位时全为数字，18位前17位为数字，最后一位是校验位，可能为数字或字符X 
      var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; 
      if(reg.test(card) === false) { return false;} 
      return true
    },

}